Optimal. Leaf size=19 \[ a x+\frac{b \tan (e+f x)}{f}-b x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0119024, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3473, 8} \[ a x+\frac{b \tan (e+f x)}{f}-b x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3473
Rule 8
Rubi steps
\begin{align*} \int \left (a+b \tan ^2(e+f x)\right ) \, dx &=a x+b \int \tan ^2(e+f x) \, dx\\ &=a x+\frac{b \tan (e+f x)}{f}-b \int 1 \, dx\\ &=a x-b x+\frac{b \tan (e+f x)}{f}\\ \end{align*}
Mathematica [A] time = 0.006066, size = 28, normalized size = 1.47 \[ a x-\frac{b \tan ^{-1}(\tan (e+f x))}{f}+\frac{b \tan (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0., size = 29, normalized size = 1.5 \begin{align*} ax+{\frac{b\tan \left ( fx+e \right ) }{f}}-{\frac{b\arctan \left ( \tan \left ( fx+e \right ) \right ) }{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.61604, size = 31, normalized size = 1.63 \begin{align*} a x - \frac{{\left (f x + e - \tan \left (f x + e\right )\right )} b}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.05917, size = 46, normalized size = 2.42 \begin{align*} \frac{{\left (a - b\right )} f x + b \tan \left (f x + e\right )}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.161364, size = 20, normalized size = 1.05 \begin{align*} a x + b \left (\begin{cases} - x + \frac{\tan{\left (e + f x \right )}}{f} & \text{for}\: f \neq 0 \\x \tan ^{2}{\left (e \right )} & \text{otherwise} \end{cases}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.19552, size = 340, normalized size = 17.89 \begin{align*} a x + \frac{{\left (\pi - 4 \, f x \tan \left (f x\right ) \tan \left (e\right ) - \pi \mathrm{sgn}\left (2 \, \tan \left (f x\right )^{2} \tan \left (e\right ) + 2 \, \tan \left (f x\right ) \tan \left (e\right )^{2} - 2 \, \tan \left (f x\right ) - 2 \, \tan \left (e\right )\right ) \tan \left (f x\right ) \tan \left (e\right ) - \pi \tan \left (f x\right ) \tan \left (e\right ) + 2 \, \arctan \left (\frac{\tan \left (f x\right ) \tan \left (e\right ) - 1}{\tan \left (f x\right ) + \tan \left (e\right )}\right ) \tan \left (f x\right ) \tan \left (e\right ) + 2 \, \arctan \left (\frac{\tan \left (f x\right ) + \tan \left (e\right )}{\tan \left (f x\right ) \tan \left (e\right ) - 1}\right ) \tan \left (f x\right ) \tan \left (e\right ) + 4 \, f x + \pi \mathrm{sgn}\left (2 \, \tan \left (f x\right )^{2} \tan \left (e\right ) + 2 \, \tan \left (f x\right ) \tan \left (e\right )^{2} - 2 \, \tan \left (f x\right ) - 2 \, \tan \left (e\right )\right ) - 2 \, \arctan \left (\frac{\tan \left (f x\right ) \tan \left (e\right ) - 1}{\tan \left (f x\right ) + \tan \left (e\right )}\right ) - 2 \, \arctan \left (\frac{\tan \left (f x\right ) + \tan \left (e\right )}{\tan \left (f x\right ) \tan \left (e\right ) - 1}\right ) - 4 \, \tan \left (f x\right ) - 4 \, \tan \left (e\right )\right )} b}{4 \,{\left (f \tan \left (f x\right ) \tan \left (e\right ) - f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]